<HTML>
<HEAD>
<TITLE>editconf</TITLE>
<LINK rel=stylesheet href="style.css" type="text/css">
<BODY text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#990000" alink="#FF0000">
<TABLE WIDTH="98%" NOBORDER >
<TR><TD WIDTH=400>
<TABLE WIDTH=400 NOBORDER>
<TD WIDTH=116>
<a href="http://www.gromacs.org/"><img SRC="../images/gmxlogo_small.png"BORDER=0 </a></td>
<td ALIGN=LEFT VALIGN=TOP WIDTH=280><br><h2>editconf</h2><font size=-1><A HREF="../online.html">Main Table of Contents</A></font><br><br></td>
</TABLE></TD><TD WIDTH="*" ALIGN=RIGHT VALIGN=BOTTOM><p><B>VERSION 4.5<br>
Thu 26 Aug 2010</B></td></tr></TABLE>
<HR>
<H3>Description</H3>
<p>
editconf converts generic structure format to <tt>.<a href="gro.html">gro</a></tt>, <tt>.<a href="g96.html">g96</a></tt>
or <tt>.<a href="pdb.html">pdb</a></tt>.
<p>
The box can be modified with options <tt>-box</tt>, <tt>-d</tt> and
<tt>-angles</tt>. Both <tt>-box</tt> and <tt>-d</tt>
will center the system in the box, unless <tt>-noc</tt> is used.
<p>
Option <tt>-bt</tt> determines the box type: <tt>triclinic</tt> is a
triclinic box, <tt>cubic</tt> is a rectangular box with all sides equal
<tt>dodecahedron</tt> represents a rhombic dodecahedron and
<tt>octahedron</tt> is a truncated octahedron.
The last two are special cases of a triclinic box.
The length of the three box vectors of the truncated octahedron is the
shortest distance between two opposite hexagons.
The volume of a dodecahedron is 0.71 and that of a truncated octahedron
is 0.77 of that of a cubic box with the same periodic image distance.
<p>
Option <tt>-box</tt> requires only
one value for a cubic box, dodecahedron and a truncated octahedron.
<p>
With <tt>-d</tt> and a <tt>triclinic</tt> box the size of the system in the x, y
and z directions is used. With <tt>-d</tt> and <tt>cubic</tt>,
<tt>dodecahedron</tt> or <tt>octahedron</tt> boxes, the dimensions are set
to the diameter of the system (largest distance between atoms) plus twice
the specified distance.
<p>
Option <tt>-angles</tt> is only meaningful with option <tt>-box</tt> and
a triclinic box and can not be used with option <tt>-d</tt>.
<p>
When <tt>-n</tt> or <tt>-ndef</tt> is set, a group
can be selected for calculating the size and the geometric center,
otherwise the whole system is used.
<p>
<tt>-rotate</tt> rotates the coordinates and velocities.
<p>
<tt>-princ</tt> aligns the principal axes of the system along the
coordinate axes, this may allow you to decrease the box volume,
but beware that molecules can rotate significantly in a nanosecond.
<p>
Scaling is applied before any of the other operations are
performed. Boxes and coordinates can be scaled to give a certain density (option
<tt>-density</tt>). Note that this may be inaccurate in case a <a href="gro.html">gro</a>
file is given as input. A special feature of the scaling option, when the
factor -1 is given in one dimension, one obtains a mirror image,
mirrored in one of the plains, when one uses -1 in three dimensions
a point-mirror image is obtained.<p>
Groups are selected after all operations have been applied.<p>
Periodicity can be removed in a crude manner.
It is important that the box sizes at the bottom of your input file
are correct when the periodicity is to be removed.
<p>
When writing <tt>.<a href="pdb.html">pdb</a></tt> files, B-factors can be
added with the <tt>-bf</tt> option. B-factors are read
from a file with with following format: first line states number of
entries in the file, next lines state an index
followed by a B-factor. The B-factors will be attached per residue
unless an index is larger than the number of residues or unless the
<tt>-atom</tt> option is set. Obviously, any type of numeric data can
be added instead of B-factors. <tt>-legend</tt> will produce
a row of CA atoms with B-factors ranging from the minimum to the
maximum value found, effectively making a legend for viewing.
<p>
With the option -mead a special <a href="pdb.html">pdb</a> (pqr) file for the MEAD electrostatics
program (Poisson-Boltzmann solver) can be made. A further prerequisite
is that the input file is a run input file.
The B-factor field is then filled with the Van der Waals radius
of the atoms while the occupancy field will hold the charge.
<p>
The option -grasp is similar, but it puts the charges in the B-factor
and the radius in the occupancy.
<p>
Option <tt>-align</tt> allows alignment
of the principal axis of a specified group against the given vector, 
with an optional center of rotation specified by <tt>-aligncenter</tt>.
<p>
Finally with option <tt>-label</tt> editconf can add a chain identifier
to a <a href="pdb.html">pdb</a> file, which can be useful for analysis with e.g. rasmol.
<p>
To convert a truncated octrahedron file produced by a package which uses
a cubic box with the corners cut off (such as Gromos) use:<br>
<tt>editconf -f &lt;in&gt; -rotate 0 45 35.264 -bt o -box &lt;veclen&gt; -o &lt;out&gt;</tt><br>
where <tt>veclen</tt> is the size of the cubic box times sqrt(3)/2.
<P>
<H3>Files</H3>
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2>
<TR><TH>option</TH><TH>filename</TH><TH>type</TH><TH>description</TH></TR>
<TR><TD ALIGN=RIGHT> <b><tt>-f</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="files.html">    conf.gro</a></tt> </TD><TD> Input </TD><TD> Structure file: <a href="gro.html">gro</a> <a href="g96.html">g96</a> <a href="pdb.html">pdb</a> <a href="tpr.html">tpr</a> etc. </TD></TR>
<TR><TD ALIGN=RIGHT> <b><tt>-n</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="ndx.html">   index.ndx</a></tt> </TD><TD> Input, Opt. </TD><TD> Index file </TD></TR>
<TR><TD ALIGN=RIGHT> <b><tt>-o</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="files.html">     out.gro</a></tt> </TD><TD> Output, Opt. </TD><TD> Structure file: <a href="gro.html">gro</a> <a href="g96.html">g96</a> <a href="pdb.html">pdb</a> etc. </TD></TR>
<TR><TD ALIGN=RIGHT> <b><tt>-mead</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="pqr.html">    mead.pqr</a></tt> </TD><TD> Output, Opt. </TD><TD> Coordinate file for MEAD </TD></TR>
<TR><TD ALIGN=RIGHT> <b><tt>-bf</tt></b> </TD><TD ALIGN=RIGHT> <tt><a href="dat.html">   bfact.dat</a></tt> </TD><TD> Input, Opt. </TD><TD> Generic data file </TD></TR>
</TABLE>
<P>
<H3>Other options</H3>
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2>
<TR><TH>option</TH><TH>type</TH><TH>default</TH><TH>description</TH></TR>
<TR><TD ALIGN=RIGHT> <b><tt>-[no]h</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no    </tt> </TD><TD> Print help info and quit </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-[no]version</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no    </tt> </TD><TD> Print version info and quit </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-nice</tt></b> </TD><TD ALIGN=RIGHT> int </TD><TD ALIGN=RIGHT> <tt>0</tt> </TD><TD> Set the nicelevel </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-[no]w</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no    </tt> </TD><TD> View output <a href="xvg.html">xvg</a>, <a href="xpm.html">xpm</a>, <a href="eps.html">eps</a> and <a href="pdb.html">pdb</a> files </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-[no]ndef</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no    </tt> </TD><TD> Choose output from default index groups </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-bt</tt></b> </TD><TD ALIGN=RIGHT> enum </TD><TD ALIGN=RIGHT> <tt>triclinic</tt> </TD><TD> Box type for -box and -d: <tt>triclinic</tt>, <tt>cubic</tt>, <tt>dodecahedron</tt> or <tt>octahedron</tt> </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-box</tt></b> </TD><TD ALIGN=RIGHT> vector </TD><TD ALIGN=RIGHT> <tt>0 0 0</tt> </TD><TD> Box vector lengths (a,b,c) </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-angles</tt></b> </TD><TD ALIGN=RIGHT> vector </TD><TD ALIGN=RIGHT> <tt>90 90 90</tt> </TD><TD> Angles between the box vectors (bc,ac,ab) </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-d</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>0     </tt> </TD><TD> Distance between the solute and the box </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-[no]c</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no    </tt> </TD><TD> Center molecule in box (implied by -box and -d) </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-center</tt></b> </TD><TD ALIGN=RIGHT> vector </TD><TD ALIGN=RIGHT> <tt>0 0 0</tt> </TD><TD> Coordinates of geometrical center </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-aligncenter</tt></b> </TD><TD ALIGN=RIGHT> vector </TD><TD ALIGN=RIGHT> <tt>0 0 0</tt> </TD><TD> Center of rotation for alignment </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-align</tt></b> </TD><TD ALIGN=RIGHT> vector </TD><TD ALIGN=RIGHT> <tt>0 0 0</tt> </TD><TD> Align to target vector </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-translate</tt></b> </TD><TD ALIGN=RIGHT> vector </TD><TD ALIGN=RIGHT> <tt>0 0 0</tt> </TD><TD> Translation </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-rotate</tt></b> </TD><TD ALIGN=RIGHT> vector </TD><TD ALIGN=RIGHT> <tt>0 0 0</tt> </TD><TD> Rotation around the X, Y and Z axes in degrees </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-[no]princ</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no    </tt> </TD><TD> Orient molecule(s) along their principal axes </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-scale</tt></b> </TD><TD ALIGN=RIGHT> vector </TD><TD ALIGN=RIGHT> <tt>1 1 1</tt> </TD><TD> Scaling factor </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-density</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>1000  </tt> </TD><TD> Density (g/l) of the output box achieved by scaling </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-[no]pbc</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no    </tt> </TD><TD> Remove the periodicity (make molecule whole again) </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-[no]grasp</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no    </tt> </TD><TD> Store the charge of the atom in the B-factor field and the radius of the atom in the occupancy field </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-rvdw</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>0.12  </tt> </TD><TD> Default Van der Waals radius (in nm) if one can not be found in the database or if no parameters are present in the topology file </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-sig56</tt></b> </TD><TD ALIGN=RIGHT> real </TD><TD ALIGN=RIGHT> <tt>0     </tt> </TD><TD> Use rmin/2 (minimum in the Van der Waals potential) rather than sigma/2  </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-[no]vdwread</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no    </tt> </TD><TD> Read the Van der Waals radii from the file vdwradii.<a href="dat.html">dat</a> rather than computing the radii based on the force field </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-[no]atom</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no    </tt> </TD><TD> Force B-factor attachment per atom </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-[no]legend</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no    </tt> </TD><TD> Make B-factor legend </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-label</tt></b> </TD><TD ALIGN=RIGHT> string </TD><TD ALIGN=RIGHT> <tt>A</tt> </TD><TD> Add chain label for all residues </TD></TD>
<TR><TD ALIGN=RIGHT> <b><tt>-[no]conect</tt></b> </TD><TD ALIGN=RIGHT> gmx_bool </TD><TD ALIGN=RIGHT> <tt>no    </tt> </TD><TD> Add CONECT records to a <a href="pdb.html">pdb</a> file when written. Can only be done when a topology is present </TD></TD>
</TABLE>
<P>
<H3>Known problems</H3>
<UL>
<LI>For complex molecules, the periodicity removal routine may break down, 
<LI>in that case you can use <a href="trjconv.html">trjconv</a>.
</UL>
<P>
<hr>
<div ALIGN=RIGHT>
<font size="-1"><a href="http://www.gromacs.org">http://www.gromacs.org</a></font><br>
<font size="-1"><a href="mailto:gromacs@gromacs.org">gromacs@gromacs.org</a></font><br>
</div>
</BODY>
